<?php
/** 初始化项目 */
require '../../app/app.php';
/** 初始化数据库 */
use app\util\Mysql;
$database = Mysql::init();

if (isset($_SESSION['username']) && $_SESSION['username'] != "") {
    $username = $_POST["username"];
    $password = $_POST["password"];
    $phone = $_POST["phone"];
    $email = $_POST["email"];
    $imgurl = $_POST["imgurl"];
    $group = $_POST["group"];
    $adming = $_POST["adming"];
    $open = $_POST["open"];
    if ($open == "on") {
        $open = "是";
    } else {
        $open = "否";
    }


    // echo $username;
    $list = $database->select("user_text",["username","phone","email","imgurl"],["username" => $username]);
    echo json_encode($list);
}
// echo $_SESSION['username'];
